function getEchsrtsData(dataX, dataY) {
    const option = {
        title: {
            text: 'Structural Deformation Monitoring Data of Deep Foundation Pit',
        },
        tooltip: {
            trigger: 'axis',
        },
        legend: {
            // data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎']
        },
        toolbox: {
            show: true,
            feature: {
                // dataZoom: {
                //     yAxisIndex: 'none'
                // },
                // dataView: {readOnly: false},
                // magicType: {type: ['line', 'bar']}
                // mark : {show: true},
                // dataView : {show: true, readOnly: false},
                magicType: { show: false, type: ['line'] },
                // restore : {show: true},
                // saveAsImage : {show: true}
            },
        },
        calculable: true,
        xAxis: {
            name: 'Time',
            type: 'category',
            boundaryGap: false,
            data: dataX,
        },
        yAxis: {
            name: 'Monitoring data / KN',
            type: 'value',
            scale: true,
        },
        series: [
            {
                name: 'Monitoring data',
                type: 'line',
                data: dataY,
                markPoint: {
                    data: [
                        // {type: 'min', name: '最小值'}[
                    ],
                },
                markLine: {
                    data: [
                        {
                            name: '警报值',
                            yAxis: 20000,
                        },
                    ],
                },
            },
        ],
    };
    window.echarts.init(document.getElementById('main')).setOption(option);
}

export { getEchsrtsData };
